
import data from "../pages/hotel/data";
import request from "@/utils/request.js";


export function getHotelListApi(data)
{
  return request.get("hotel/search_hotel_list",data,{ noAuth : true});
}

export function getHotelLabelDataApi(data)
{
  return request.get("hotel/getHotelLabelData",data,{ noAuth : true});
}

export function getHotelDetailApi(id,data)
{
  return request.get("hotel/front_hotel_detail/"+id,data,{ noAuth : true});
}


export function getHotelRoomTypeApi(id,data)
{
  return request.get("hotel/get_hotel_room_type/"+id,data,{ noAuth : true});
}
export function getHotelRoomDetailApi(id,data)
{
  return request.get("hotel/get_hotel_room_detail/"+id,data,{ noAuth : true});
}

export function getHotelPackageDetailApi(id,data)
{
  return request.get("hotel/get_hotel_package_detail/"+id,data,{ noAuth : true});
}

export function calculatePriceApi(data)
{
  return request.post("hotel/calculate_price",data, { login: true });
}

export function createOrderApi(data)
{
  return request.post("hotel/createOrder",data, { login: true });
}


/**
 * 获取收银台信息
 * @param object data
*/
export function getPayHotelOrderApi(id){
  return request.get(`hotel/getPayHotelOrder/${id}`);
}


// 支付状态订单
export function getHotelOrderStatus(uni){
  return request.get('hotel/hotelOrderStatus/'+uni);
}
export function orderHotelPay(uni, data){
  return request.get('hotel/orderHotelPay/'+uni, data);
}
export function getHotelOrders( data){
  return request.get('hotel/get_user_hotel_order_list', data);
}


export function getHotelOrderDetail(id){
  return request.get(`hotel/get_user_hotel_order_detail/${id}`);
}
export function cancelOrder(id){
  return request.get(`hotel/cancel_order/${id}`);
}
export function orderRefundSim(id){
  return request.get(`hotel/orderRefundSim/${id}`);
}

export function refundApply(id,data){
  return request.post(`hotel/refundApply/${id}`,data);
}
